﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Xml.Linq;
using RuleCode.Table;

namespace map.member
{
    public partial class configshop_custom : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                cbuser u = cbuser.getcuruser();
                string id = u.cbuserid.ToString();
                cbshopcss sc = cbshopcss.findorcreate(id);
                string css = sc.getstylestring();
                Literalcss.Text = css;

                if (this.Request.Params["ScriptTag"] != null)
                {
                    cbshoppageelement spe = cbshoppageelement.findorcreatesystem(id,
                        this.Request.Params["ScriptTag"].ToString());
                    Literal1.Text = spe.gethtml0(0);
                    if (spe.cb2.Value == "1")
                    {
                        css = css.Replace("border:solid 1px", "border:solid 0px");
                        Literalcss.Text = css;
                    }
                    if (spe.cb3.Value == "1")
                    {
                        css += "<style type=\"text/css\">";

                        css += ".titlediv";
                        css += "{";
                        css += "margin-top:10px;";
                        css += "}";

                        css += "</style>";

                        Literalcss.Text = css;
                    }
                    


                }
            }
        }
    }
}
